<template>
  <div class="goods_header">
    <div class="header">
      <van-icon name="arrow-left" @click="goback()" class="back"/>

      <div class="goods_nav">
        <ul class="info_list">
          <li>商品</li>
          <li>详情</li>
          <li>评价</li>
        </ul>
      </div>

      <div class="icon_right">
        <van-icon name="shopping-cart-o" @click="gocar()"/>
        <van-icon name="ellipsis" @click="ok=!ok"/>
      </div>
    </div>

    <div class="dropdown" v-if="ok">
      <ul>
        <li>
          <van-icon name="wap-home"/>
          <span>首页</span>
        </li>
        <li>
          <van-icon name="chat-o"/>
          <span>分享</span>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
        ok:false
    };
  },
  methods: {
    goback() {
      this.$router.go(-1);
    },
    gocar() {
      this.$router.push("/shopping");
    }
  }
};
</script>

<style scope>
.goods_header {
  height: 50px;
  width: 100%;
  /* background: red; */
  background: white;
}
.goods_header .header .back {
  float: left;
  margin-left: 10px;
  top: 15px;
}
.goods_header .header i {
  font-size: 25px;
}
.goods_header .header .icon_right {
  float: right;
}
.goods_header .header .icon_right i {
  margin-right: 10px;
  top: 15px;
}
.goods_header .dropdown {
  position: absolute;
  z-index: 99;
  top: 50px;
  right: 0px;
  width: 94px;
  text-align: center;
  background: url("../../assets/bg8.png");
}
.goods_header .dropdown li span{
    display: block;
    margin-right:5px; 
    font-size: 14px;
    margin-top:10px;
    margin-bottom:10px;  
    padding-top:5px; 
    /* background: white; */
}
.goods_header .dropdown li i{
    font-size: 20px;
    padding-top:4px; 
    margin-left:10px; 
    float: left;
}
.goods_nav{
  /* display: inline-block; */
  margin: 0 auto;
  width: 150px;
  line-height: 50px;
}
.goods_nav .info_list li{
  float: left;
  margin-left:10px; 
}
</style>